using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Outpatient.Doman.Smart
{
    /// <summary>
    /// 价目项实体类
    /// </summary>
    [Table("PriceItem")]
    public class PriceItem
    {
        /// <summary>
        /// 价目唯一标识 - 主键，自增
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int PriceId { get; set; }

        /// <summary>
        /// 服务名称(如"图文咨询"、"电话问诊"等)
        /// </summary>
        [Required]
        [StringLength(100)]
        public string ServiceName { get; set; } = string.Empty;

        /// <summary>
        /// 服务类型(如"图文"、"电话"、"视频"等)
        /// </summary>
        [Required]
        [StringLength(20)]
        public string ServiceType { get; set; } = string.Empty;

        /// <summary>
        /// 所属科室ID  外键
        /// </summary>
        [Required]
        public int DepartmentId { get; set; }

        /// <summary>
        /// 医生级别(如"主治医师"、"副主任医师"等)
        /// </summary>
        [StringLength(50)]
        public string? DoctorLevel { get; set; }

        /// <summary>
        /// 价格
        /// </summary>
        [Required]
        [Column(TypeName = "decimal(10,2)")]
        public decimal Price { get; set; }

        /// <summary>
        /// 货币单位
        /// </summary>
        [StringLength(10)]
        public string Currency { get; set; } = "CNY";

        /// <summary>
        /// 生效日期
        /// </summary>
        public DateTime ValidFrom { get; set; } = DateTime.Now;

        /// <summary>
        /// 是否删除 - 软删除
        /// </summary>
        public bool IsDeleted { get; set; } = false;


        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 标签（药品  诊疗  检查 ）
        /// </summary>
        public string Tag { get; set; }
        /// <summary>
        /// 项目样本
        /// </summary>
        public string Sample { get; set; }



        /// <summary>
        /// 导航属性 - 关联的科室信息
        /// </summary>
        [ForeignKey("DepartmentId")]
        public virtual DepartmentInfo? Department { get; set; }
    }
} 